findElementByTagName

public abstract Optional<Element> findElementByTagName(String tagName)

Returns the first Element object found in the current search context by the given tagName. Returns an empty Optional if no element was found.

Parameters

tagName

a string that represents the tag name of the HTML element

Throws

if the given tagName is empty

when this instance is closed